In the local case, the D11 interface library (essentially Xlib for D11) translates D11 requests into D11 active context protected procedure calls. In the case of a remote D11 kernel or X11 server, the D11 interface library uses the X11 protocol. A per-connection local or remote jump table is used to vector D11 request generating routines to the correct local or remote request generator.
A D11 program can use its active context file descriptor to determine when events or errors have been placed in its D11 connection event queue. By using the select system call on the D11 program's active context file descriptor, the program can determine when events are pending because acnotify is called whenever events are appended to a D11 program's event queue. XNextEvent and XPending can block and poll for events respectively using this mechanism. A ``return events and errors'' protected procedure call copies all the events and errors from a D11 connection's event queue into the caller's memory space. acack acknowledges active context notification. This is actually more efficient than Xlib's event reading strategy that requires a 32-byte read system call per event, reply, or error received to ensure the length field is decoded before any more data is read so variable length replies can be read into contiguous buffers. D11 makes the returning of events and errors more efficient than in X11.